<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="../文件/jquery-1.8.3.min.js"></script>
    <title>Document</title>
</head>
<body>
    <table id="table1" border="1">
        <tr>
            <td>姓名</td>
            <td>年龄</td>
            <td>性别</td>
            <td>操作</td>
        </tr>
        <tr>
            <td>张三</td>
            <td>22</td>
            <td>男</td>
            <td>
                <button class="del">删除</button>
            </td>
        </tr>
    </table>
    <button id="people">基本人员</button>
    <button id="addS">添加人员</button>

    <script>
        $(document).ready(function(){
            //基本人员
            $("#people").click(function(){
            })
            //添加人员
            $("#addS").click(function(){
                var str1=prompt("输入姓名");
                var str2=prompt("输入年龄");
                var str3=prompt("输入性别");
                $("#table1").append("<tr><td>"+str1+"</td><td>"+str2+"</td><td>"+str3+"</td><td><button class='del'>删除</button></td></tr>");
                //删除信息
                $(".del").click(function() {
                        $(this).parent().parent().remove();
                    });
            })
            
        })

    </script>
</body>
</html>